import java.util.List;

/**
 * Description:
 * Date: 2025-11-11
 * Time: 16:08
 */
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.creatTree();
        System.out.print("前序遍历:");
        binaryTree.preOrder(root);
        System.out.println();
        System.out.print("中序遍历:");
        binaryTree.inOrder(root);
        System.out.println();
        System.out.print("后序遍历:");
        binaryTree.postOrder(root);
        System.out.println();

        System.out.print("前序遍历:");
        List<Character> listC = binaryTree.preorderTraversal(root);
        System.out.println(listC);

        System.out.print("中序遍历:");
        List<Character> listZ = binaryTree.inorderTraversal(root);
        System.out.println(listZ);

        System.out.print("后序遍历:");
        List<Character> listH = binaryTree.postorderTraversal(root);
        System.out.println(listH);


    }
}
